package com.nhjf.model.teachers;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.student.Student;
import com.nhjf.model.system.User;

@SuppressWarnings("serial")
@Entity
@Table(name = "userFollow")
public class UserFollow extends BaseModel{
	/**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	 * 被关注人的userid
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "followUserId")
	private User followUser;
	/**
	 * 粉丝userid
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "fansUserId")
	private User fansUser;
	/**
	 * 关注时间
	 */
	@Column(name = "followTime")
	private Date followTime;
	/**
	 * 1代表学生关注老师，2代表老师关注学生
	 */
	@Column(name = "type")
	private Integer type;

	

	
	
	public User getFollowUser() {
		return followUser;
	}
	public void setFollowUser(User followUser) {
		this.followUser = followUser;
	}
	public User getFansUser() {
		return fansUser;
	}
	public void setFansUser(User fansUser) {
		this.fansUser = fansUser;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Date getFollowTime() {
		return followTime;
	}
	public void setFollowTime(Date followTime) {
		this.followTime = followTime;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}


}
